//
//  UIScrollView+RACSignalSupport.m
//  RACObjc
//
//  Created by 李阳 on 2018/6/27.
//

#import "UIScrollView+RACSignalSupport.h"
#import "RACDelegateProxy.h"
#import <objc/runtime.h>

@implementation UIScrollView (RACSignalSupport)

- (RACDelegateProxy *)rac_delegateProxy {
    RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
    if (proxy == nil) {
        proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIScrollViewDelegate)];
        objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    }
    
    return proxy;
}

@end
